class Solution(object):
    def removeDuplicates(self, nums):
        if len(nums)<2:
            return 1
        i=0
        for j in range(1,len(nums)):
            if(nums[i]!=nums[j]):
                i+=1
                nums[i]=nums[j]
        print(nums)
        return i+1
x=Solution()
x.removeDuplicates([1,1,2])